﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DAL;
using BLL;

public partial class ERDS_QTJL : System.Web.UI.Page
{
    BLL.BLLEeds br = new BLLEeds();
    string strApp = "";
    string errMsg = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DateTime dt = System.DateTime.Now;
            this.DateLR.Value = dt.AddDays(-1).ToString("yyyy-MM-dd");
            string JZ = "";

            if (this.DDLJZ.SelectedValue == "JZ1")
            {
                JZ = "1";
            }
            else if (this.DDLJZ.SelectedValue == "JZ2")
            {
                JZ = "2";
            }
            else if (this.DDLJZ.SelectedValue == "JZ3")
            {
                JZ = "3";
            }
            else if (this.DDLJZ.SelectedValue == "JZ4")
            {
                JZ = "4";
            }

            strApp = br.RetQTJL(DateTime.Parse(this.DateLR.Value).ToString("yyyy-MM-dd"), JZ,out errMsg);
            this.show.InnerHtml = strApp;
        }
    }
    protected void LRBRQ_Click(object sender, EventArgs e)
    {
        string JZ = "";

        if (this.DDLJZ.SelectedValue == "JZ1")
        {
            JZ = "1";
        }
        else if (this.DDLJZ.SelectedValue == "JZ2")
        {
            JZ = "2";
        }
        else if (this.DDLJZ.SelectedValue == "JZ3")
        {
            JZ = "3";
        }
        else if (this.DDLJZ.SelectedValue == "JZ4")
        {
            JZ = "4";
        }

        strApp = br.RetQTJL(DateTime.Parse(this.DateLR.Value).ToString("yyyy-MM-dd"), JZ, out errMsg);
        this.show.InnerHtml = strApp;
    }
}
